package com.si.entite;

public class Fou extends Piece{
        String pathImage1= "./src/com/ChessApps/images/3.gif";
        String pathImage2= "./src/com/ChessApps/images/9.gif";
        
	public Fou(String couleur) {
		this.couleur= couleur;
	}

	@Override
	public boolean validerDep(Position posDepart, Position posFinal) {
		int diffColonne= posFinal.x-posDepart.x;
		int diffLigne= posFinal.y-posDepart.y;
		if (this.validerEchec(posFinal)){
		if (((diffLigne==diffColonne)||(diffLigne== -diffColonne)))
			return true;
		return false;
	}else return false;
                
        }


	public boolean manger(Position posDepart, Position posFinal) {
		// TODO Auto-generated method stub
		return false;
	}

    @Override
    public String getPathImage(int i) {
       if (i== 1)
        {
            return pathImage1;
        }
        else {return pathImage2;}
    }
        

        public String toString(){return "Fou";}
}
